// ChildFrm.cpp : implementation of the CPunchFrame class
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "resource.h"

#include "View.h"
#include "PunchFrm.h"
#include "ChildFrm.h"

void CPunchFrame::OnFinalMessage(HWND /*hWnd*/)
{
   
    delete this;
}
BOOL CPunchFrame::PreTranslateMessage(MSG* pMsg)
{
    if (CMDIChildWindowImpl<CPunchFrame>::PreTranslateMessage(pMsg))
        return TRUE;

    HWND hWnd = MDIGetActive();
    if (hWnd != NULL)
        return (BOOL)::SendMessage(hWnd, WM_FORWARDMSG, 0, (LPARAM)pMsg);

    return FALSE;
}

BOOL CPunchFrame::OnIdle()
{
    return FALSE;
}


LRESULT CPunchFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{

    const DWORD dwSplitStyle = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
    m_splitwindow.Create(*this, rcDefault, NULL, dwSplitStyle);

   //m_childfrm.Create(m_splitwindow, rcDefault, NULL, dwSplitStyle);

    m_hWndClient = m_splitwindow;

    
    //m_splitwindow.SetSplitterPanes(m_childfrm, 0);


    bHandled = FALSE;

    return 1;
}



